﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="JsonHandlerDefinitions.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   Defines how json.net serializer will handle common serialization problems.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Communications
{
    using Newtonsoft.Json;

    /// <summary>
    /// Defines how json.net serializer will handle common serialization problems.
    /// </summary>
    public sealed class JsonHandlerDefinitions
    {
        public static JsonHandlerDefinitions Default = new JsonHandlerDefinitions
                                                           {
                                                               NullValueHandling = NullValueHandling.Ignore,
                                                               MissingMemberHandling = MissingMemberHandling.Ignore,
                                                               ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
                                                           };

        public NullValueHandling NullValueHandling { get; set; }

        public MissingMemberHandling MissingMemberHandling { get; set; }

        public ReferenceLoopHandling ReferenceLoopHandling { get; set; }
    }
}